home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / ddj1190.arc / E_FLOYD.ARC / SPELCHEK.DOC < prev    next >
Text File  |  1990-10-27  |  10KB  |  233 lines

  1. SPELCHEK Version 1.0 - A spelling checker.  5/13/90
  2.  
  3. Purpose of SPELCHEK
  4. -------------------
  5. SPELCHEK extracts words from an input file, or several input files,
  6. and checks them for membership in a superimposed code dictionary.
  7. Any words not found in the dictionary, it writes to an output file,
  8. one per line.  The program recognizes a number of options for:
  9.  
  10.   o High-order bit stripping
  11.  
  12.   o Appending additional information to the output word list
  13.  
  14.   o Defining the characters comprising a "word"
  15.  
  16. How to run SPELCHEK
  17. -------------------
  18. From the DOS command line enter:
  19.  
  20.   SPELCHEK filenames [-H] [-M] [-W[+/-]abc..] [@name] [-Uname]
  21.            [-Oname] [-Ppath]
  22.  
  23. Spaces delimit command line parameters.  You may intermingle
  24. input text filenames and options (mark each option with a leading
  25. hyphen).  Some options (-W,-O,-U) allow a character string or
  26. filename to follow the option letter.  This must follow with no
  27. intervening spaces or the program will mistake it for an input
  28. file name.  Some options (-H,-M) allow a "+" or "-" to
  29. indicate "on" or "off".  This also must follow with no
  30. intervening space, and "+" is assumed if it is omitted.  You may
  31. place options and filenames in an ASCII "include" file and
  32. specify its name with a leading "@" on the command line.  An
  33. include file may contain references to other include files.  You
  34. also may specify default options, filenames and include files in
  35. the DOS environment using "SET SPELCHEK=...".  For example:
  36.  
  37.   SET SPELCHEK=-H+ -Owords.out -W-ABCDEFGHIJKLMNOPQRSTUVWXYZ
  38.   SET WORDS=@defaults.spc -O
  39.  
  40. SPELCHEK processes options left-to-right, first from the DOS
  41. environment, then from the command line.  Where options conflict,
  42. the last option processed prevails.  Thus, you may override "SET"
  43. environment options on the command line.
  44.  
  45. What the options mean
  46. ---------------------
  47. -H[+/-]  Clear the high-order bit on each input character
  48.          (default off).  Use this option to process files
  49.          created by word processing programs, like WordStar,
  50.          that mark some letters by setting the high-order
  51.          bit, often at the beginning or end of a word.
  52.  
  53. -M[+/-]  Append markup information to output word list.  This
  54.          causes the program to insert a number in front of each
  55.          word written to the output file.  The number indicates
  56.          the byte position in the input where the offending word
  57.          begins.  The first byte in the input file is position 1.
  58.          Also, the program writes the file name at the beginning
  59.          of the word list for each input file.  The file name is
  60.          preceded by a zero and a space.  This output file is
  61.          intended as input to a program such as MARKDOC which
  62.          marks misspelled words in the input document.
  63.  
  64. -P[path] Indicate the drive and directory containing the
  65.          master dictionary files.  There are seven master
  66.          dictionary files: AB.DCT, CD.DCT, EH.DCT, IN.DCT,
  67.          OR.DCT, ST.DCT and UZ.DCT.  They all must reside
  68.          in the same directory.  If no -P path is specified,
  69.          the master dictionary files must reside in the current
  70.          directory or the program directory.
  71.  
  72. -U[name] Name a user dictionary file.  This option specifies the
  73.          name of an existential dictionary file produced by the
  74.          MAKEDICT program.  You may specify the drive and full path.
  75.          If a simple file name is specified, the file is assumed to
  76.          be in the current directory.  If SPELCHEK can't open the
  77.          user dictionary, it issues a warning message and processes
  78.          the input files against the master dictionaries only.
  79.  
  80. -W-abc.. Replace the "word character set" with the indicated
  81.          characters.  The program checks each character in
  82.          each input file for membership in the word character
  83.          set and defines a "word" as an uninterrupted
  84.          sequence of at least one but no more than 255
  85.          characters which are members of that set.  The
  86.          default is the set of upper and lower case
  87.          alphabetic characters.
  88.  
  89. -W+abc.. Add additional characters to the word character set.
  90.  
  91. -O[name] Name the output file.  If the name is omitted ("-O "),
  92.          output goes to "StdOut" and is available for DOS a
  93.          pipe (|) or redirection (>).  StdOut is the
  94.          default.
  95.  
  96. -O-      Suppress output.  -Onul also suppresses output.  The
  97.          program will still display word counts on the
  98.          screen.
  99.  
  100. Two examples
  101. ------------
  102. 1. Generate list of all misspelled words in the document named
  103. MYSTORY.DOC and write the list to file MYSTORY.BWD. The following
  104. are equivalent:
  105.  
  106.   SPELCHEK mystory.doc -Omystory.bwd
  107.  
  108.   SPELCHEK mystory.doc >mystory.bwd  (default StdOut)
  109.  
  110.   SET SPELCHEK=-Omystory.bwd         (set defaults)
  111.   SPELCHEK mystory.doc
  112.  
  113. 2. Generate list of misspelled words in the documents named
  114. HISPHYS.WS and OPREPORT.WS and use the list as input for MARKDOC to
  115. mark misspelled words in both documents.  The files are WordStar
  116. documents and we wish to check a user dictionary called MEDTERM.DCT
  117. in the current directory.  The main dictionary files reside in
  118. directory: D:\SPELL.
  119.  
  120.   SET SPELCHEK=-Pd:\spell -H -O -Umedterm.dct
  121.   SPELCHEK hisphys.ws opreport.ws | MARKDOC
  122.  
  123. We could have specified all the options on the command line.
  124. Ordinarily you should set the -P and -U options in the environment.
  125.  
  126. Networks
  127. --------
  128. FYI, network users, SPELCHEK opens its input files in "Read, Deny
  129. None" mode, @include files "Read, Compatibility", and the output
  130. file in "Write, Compatibility".  Only one input file at a time is
  131. open, except during processing of nested @include files.
  132.  
  133. MAKEDICT
  134. --------
  135.  
  136. MAKEDICT creates an optimal existential dictionary which can be
  137. used by SPELCHEK with the "-U" option (see above).  From the DOS
  138. command line, enter:
  139.  
  140.   MAKEDICT infile [bits] [extra]
  141.  
  142. The input file should be a list of words, one per line.  All
  143. characters should be upper case if the dictionary is intended
  144. for use with SPELCHEK.  The second parameter, "bits", specifies
  145. the number of bits to superimpose for each input word.  The
  146. number of bits partly determines the accuracy of the dictionary.
  147. For use with SPELCHEK, specify the default, 13 bits.  The third
  148. parameter, "extra", specifies an allowance of extra space so words
  149. may be added to the dictionary and it still remain within the
  150. accuracy specified by the "bits" parameter.  The default is zero.
  151. The output file is given the same name as the input file, except
  152. the extension is ".DCT".  If the input file extension is ".DCT",
  153. the output file is given the extension ".DIC".
  154.  
  155. To create a user dictionary for SPELCHEK, only the input file need
  156. be specified.  The defaults for "bits" and "extra" are exactly what
  157. is required for a user dictionary.  Example:
  158.  
  159.   MAKEDICT medterm.lst
  160.  
  161. This creates a user dictionary called: MEDTERM.DCT suitable for use
  162. by SPELCHEK.
  163.  
  164. MARKDOC
  165. -------
  166.  
  167. MARKDOC reads the output file produced by SPELCHEK with the -M+
  168. option and marks misspelled words in the input files.  From the
  169. DOS command line, enter:
  170.  
  171.   MARKDOC [markchars] [<infile]
  172.  
  173. MARKDOC reads its standard input file (STDIN).  Each input line
  174. begins with a number.  The number zero is always followed by a
  175. document file name.  Each non-zero number indicates the position
  176. of the first character of a misspelled word in the current
  177. document file.  MARKDOC reads each document file and writes an
  178. output file which is the same as the input file, except each
  179. misspelled word is preceded by "mark" characters.  The
  180. default mark character is a single "#", but you may specify
  181. mark characters as a parameter on the command line.  Examples:
  182.  
  183.   SPELCHEK document.fil -M+ | MARKDOC %@
  184.  
  185.   SPELCHEK -M+ document.fil -Omark.$$$
  186.   MARKDOC <mark.$$$
  187.  
  188. MARKDOC saves a copy of the document file under the same name
  189. as the original document except with the extension ".BAK".
  190.  
  191. Note: MARKDOC expects to read a file produced by SPELCHEK with the
  192. -M+ option.  If this option is not set, MARKDOC will abort with a
  193. Pascal error 106.  MARKDOC is intended as a demonstration of one
  194. use of the -M+ output file.  Its crash resistence should be
  195. improved before it's let out into the real world.
  196.  
  197. Legal Stuff
  198. -----------
  199. SPELCHEK.EXE, MAKEDICT.EXE, MARKDOC.EXE and SPELCHEK.DOC are:
  200.  
  201. Copyright 1990 by Edwin T. Floyd,
  202. All rights reserved.
  203.  
  204. SPELCHEK is copyrighted "free" software.  The author hereby
  205. expressly permits and encourages individuals to use SPELCHEK at
  206. home and at work and to distribute it without charge.  The author
  207. prohibits distribution of SPELCHEK for profit, or as a part of a
  208. product sold for profit, except where explicit written permission
  209. has been obtained from the author for such distribution.  Also,
  210. users groups and shareware libraries charging a disk duplication
  211. fee not exceeding $10.00 may distribute SPELCHEK.
  212.  
  213. The author makes no warranties of any kind, either expressed or
  214. implied, as to mercantability or fitness for any particular
  215. purpose.  SPELCHEK, et. al., are available as is and in no event
  216. will the author be held liable for damages, including any lost
  217. profits or incidental or consequential damages, even if the author
  218. has been advised of the possibility of such damages.
  219.  
  220. Authorship
  221. ----------
  222. SPELCHEK was written in Turbo Pascal v5.5 by:
  223.  
  224.   Edwin T. Floyd         [76067,747]  (CompuServe)
  225.   #9 Adams Park Court    404/576-3305 (work)
  226.   Columbus, GA 31909     404/322-0076 (home)
  227.  
  228. The latest version of SPELCHEK is available on CompuServe in
  229. the IBMAPP forum, and on a number of bulletin boards around the
  230. country.  If you are a Pascal programmer interested in the
  231. technology used to write this program, please drop me a line.
  232. - Edwin -                                                 5-13-90
  233.